package com.xq;


import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.CaseFormat;
import com.google.common.collect.Lists;
import com.xq.entity.UserInfo;
import com.xq.vo.Demo;
import com.xq.vo.Demo3;
import com.xq.vo.DemoVo;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import tk.mybatis.spring.annotation.MapperScan;

import java.util.*;
import java.util.concurrent.locks.ReentrantLock;

@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@MapperScan({"com.xq.mapper"})
@ServletComponentScan
public class IdentiyServiceDemoApplication {

    public static int[] topK(int[] nums, int k) {
        //统计字符出现的频率的map
        Map<Integer, Integer> count = new HashMap();
        for (int num : nums) {
            count.put(num, count.getOrDefault(num, 0) + 1);
        }

        //根据出现频率的map来构建k个元素的优先级队列
        PriorityQueue<Integer> heap =
                new PriorityQueue<>(k, (o1, o2) -> count.get(o1) - count.get(o2));

        for (int n : count.keySet()) {
            heap.add(n);
            if (heap.size() > k)
                heap.poll();
        }

        int[] result = new int[heap.size()];
        for (int i = 0; i < result.length; i++) {
            result[i] = heap.poll();
        }
        return result;
    }



    public static void main(String[] args) throws Exception {

       /* Integer a = 128;   //-128 127
        Integer b = 128;
        System.out.println(a.intValue()==b.intValue());*/

     /*   String a="hello";
        String b="hello";
        String d="he"+"llo";
        String c= new String("hello");
        //System.out.println(a==b);
        //System.out.println(a==c);
        //System.out.println(a==d);*/


        /* int[] nums = {1, 1, 1, 3, 5, 6, 5, 6, 5, 4,
        System.out.println(String.format(str2,paramStr));
        /* int[] nums = {1, 1, 1, 3, 5, 6, 5, 6, 5, 4, 7, 8};
        int[] res = topK(nums, 3);
        System.out.println(Arrays.toString(res));*/

/*
        String s ="2021/9/1";
        Date date = DateUtils.parseDate(s,"yyyy/MM/dd");
        String str = DateFormatUtils.format(date,"yyyy-MM");
        System.out.println(str);*/
      /*  HttpUtil.createPost("").timeout(20000)
        HttpUtil.createPost("").body(JSON.toJSONString(demo)).header("appSecretKey","").
                .header("appSystemName","1").execute().body();*/



       /* String str="{ 'code': '0000', 'msg': 'sccuess', 'biz_encrypt': '', 'biz_content': {'RetCode': '0000', 'RetMsg': ' 查 询 成 功 ','OpenID': 'OPENID','CustType': 2,'Cards': [ { 'Didf': 'DIDF', 'ChanMsk': '1100000000','DidfAlias': '487471','DidfType': '401','Currency': '156','CashFlag': '0','BranchProv': '11','AbisBranchProv': '11','AbisBranch': '110327','BranchCity': '','BranchName': ' 北 京 分 行 ','Bank': '03','ARType': '2','IsDefaultDidf': '','HidFlag': 'N','EBRegBranch': '110327','Verify': '1','CardClass': '1'},{ 'Didf': 'DIDF', 'ChanMsk': '1100000000','DidfAlias': '487471','DidfType': '401','Currency': '156','CashFlag': '0','BranchProv': '11','AbisBranchProv': '11','AbisBranch': '110327','BranchCity': '','BranchName': ' 北 京 省 分 行 ','Bank': '03','ARType': '2','IsDefaultDidf': '','HidFlag': 'N','EBRegBranch': '110327','Verify': '1','CardClass': '1'}]} , 'responseid': '0202007010909588000' }";
        Demo3 demo3 = JSONObject.parseObject(str, Demo3.class);
        String cards = JSON.toJSONString(demo3.getBiz_content().getCards());
        List<Map> list = JSON.parseArray(cards,Map.class);
        System.out.println(JSON.toJSONString(list));*/

     /*   Demo demo = new Demo();
        String str = HttpUtil.createPost("").body(JSON.toJSONString(demo)).header("appSecretKey","")
                .header("appSystemName","1").execute().body();*/




        /* ThreadPoolExecutor executor = new ThreadPoolExecutor(32,52,1L, TimeUnit.SECONDS,
                new LinkedBlockingQueue<>(200));


        long start = System.currentTimeMillis();

        CompletableFuture<String> cf1 = CompletableFuture.supplyAsync(() -> {
            try {
                Thread.sleep(3000);
            } catch (Exception e) {
                e.printStackTrace();
            }

            return "cf1";
        }, executor);

        CompletableFuture<String> cf2 = CompletableFuture.supplyAsync(() -> {
            try {
                Thread.sleep(3000);
            } catch (Exception e) {
                e.printStackTrace();
            }

            return "cf2";
        }, executor);

        CompletableFuture<String> cf3 = CompletableFuture.supplyAsync(() -> {
            try {
                Thread.sleep(3000);
            } catch (Exception e) {
                e.printStackTrace();
            }

            return "cf3";
        }, executor);
        CompletableFuture.allOf(cf1,cf2,cf3).get();

        System.out.println("block finish, consume time:" + (System.currentTimeMillis() - start));
        System.out.println( cf1.get()+" "+cf2.get()+" "+cf3.get());*/
       /* AES aes = SecureUtil.aes("xuqing1111111111".getBytes());
        String str = aes.encryptBase64("你好大宝");
        System.out.println(str);
        System.out.println(aes.decryptStr("AEmKkwSQLsXtCcsqWPCzww=="));

        DES des = SecureUtil.des("xuqing2222222222".getBytes());
        String str2 = des.encryptBase64("你好大宝2");
        System.out.println(str2);
        System.out.println(s.decryptStr("cEJCoyetQMyaVP3YvIUhig=="));*/

        SpringApplication.run(IdentiyServiceDemoApplication.class, args);

       /* String str = RandomUtil.randomNumbers(6);
       String  str2 = RandomUtil.randomString(6);
        System.out.println(str+" "+str2);
       Date nowDate = new Date();
        DateTime date  = DateUtil.offsetDay(nowDate,-1);
        long num = DateUtil.between(date,nowDate, DateUnit.HOUR);
        System.out.println(DateUtil.format(nowDate,"yyyy-MM-dd HH:mm:ss"));
        System.out.println(num);*/

       /* Map map = new HashMap();
        map.put("app_id","pnjgrriit6wghnlo");
        map.put("app_secret","YXBoenBlWnZmanhLWTRxenNCL1p3Zz09");
        String str = HttpUtil.post("https://mxnzp.com/api/address/list",map);
        System.out.println(str);
        CityVoRes res = JSONObject.parseObject(str, CityVoRes.class);
        if(res.getCode()!=1){
            return;
        }
        for (CityVoRes.DataBean dataBean : res.getData()){

        }*/
/*
        JSONObject jsonObject = JSONObject.parseObject(str);
        int code = jsonObject.getInteger("code");
        if(code!=1){
            return;
        }
        JSONArray array = jsonObject.gtJSONArray("data");
        for(int i=0;i<array.size();i++){
            JSONObject jsb = array.getJSONObject(i);
            System.out.println(jsb.getString("code")+" "+jsb.getString("name") );
        }*/

        /*String url="http://58.240.115.226:5480/danastudio/metadata/collect/dblist";
        String authorization="Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MjA3MjM4OTcsImlhdCI6MTYyMDcyMzI5NywiaXNzIjoiZGFuYXN0dWRpb19hdXRoX3NlcnZlciIsIm1vZHVsZXMiOlsiZGV2Y2VudGVyIiwib3BlcmF0aW9ucyJdLCJwcm9qZWN0X2lkIjoic2h4YyIsInJvbGVfaWQiOiIiLCJyb2xlX25hbWUiOiIiLCJ0a3ZlcnNpb24iOjAsInVzZXJfaWQiOiJBWGdXTlNkaTZkd25yd3hMN0hFNCIsInVzZXJfbmFtZSI6InNoeGMifQ.cDD61zF8VwY4V4c53pEOyRVMxeOquBCjdF6T0bV78m_Kmcx_UeLVvshAGNhozKxwBg3pov5YdwNxtPl7odY564QFoTObVXN-xl0m23jNYQukrXXp3lnwJ_50udPlMYgYzKGmTfKAAuNLiMCrlkgXz6Uw0rzTXLnCPyk8iSpZ4699RUtLNXA6ak3fqOtv5FiqaVyRBxpeGOo2tfOllfgyNUqWuVe4zrMZhSE9x9rer4jsNKS-0A2lJEAEWafAXWJRoqED-ruEliIDEoxyIWTG6HZWT5hPtBBeEvog-EHi3ncrDkl_nYUrCy0Hql6TFuqu0kLzlNMwwH-X2qi2v5cRsWt3CkRifh4Jg7awJqWjK_D6a11bS2hMBoA43WOIoUZI1jeadKq_Rl5bQHLdf6hIikfdy7cIb6lUoSv25_bAlwBuB4Yqb7F2xKNDFq6yPThxjIFnf_InJgac3EzmjPaigCWfUL9wPJ9yg9qtt0ozNpNcDiIXsIfLDaRPaOGMlthcVFX_OdtU1saYD4deyxn6l-bsKyeh1CqtboYcFDaqAMMTPILiqx6NS13q0PlKppZBTX-bUQZBMJBuWNxWahm14yQi7oiGQXAKo5233UwTVC63xtQbYP6mZBbi2NhimeRYJDEIuvBXXHrBdaqBdFZCbVxtsE0afwmm8xodS3kUhgY";
        Map<String,Object> map= new HashMap<>();
        map.put("listall",true);
        map.put("sort",0);
        map.put("sorttype",1);
        String str = HttpUtil.createPost(url).header("Authorization",authorization).timeout(6000)
                .body(JSON.toJSONString(map)).execute().body();
                System.out.println(str);*/
        //String str="{\"code\":200,\"result\":[{\"id\":\"AXjD7CEcpVWzSylSseh3\",\"dbname\":\"hjk_dm\",\"dbtype\":\"dameng\",\"normalconn\":{\"dbip\":\"192.168.90.118\",\"dbport\":\"5326\",\"dbuser\":\"TEST\",\"dbtype\":\"dameng\",\"dbpassword\":\"123456789\",\"oraclesid\":\"\",\"oracleserver\":\"\"},\"csvconn\":{\"ip\":\"\",\"port\":\"\",\"loginuser\":\"\",\"loginpassword\":\"\",\"encoding\":\"\",\"delimiter\":\"\",\"csvpaths\":\"\",\"localpath\":\"\"},\"hiveconn\":{\"hiveurl\":\"\",\"coresitexmlpath\":\"\",\"hivesitexmlpath\":\"\",\"hdfssitexmlpath\":\"\",\"authmethod\":0,\"keytabfilepath\":\"\",\"krb5confpath\":\"\",\"principal\":\"\",\"driverinfo\":{\"id\":\"\",\"driverpluginname\":\"\",\"name\":\"\",\"driverpath\":\"\"},\"hiveuser\":\"\",\"hivepassword\":\"\",\"domains\":null},\"haveschema\":true,\"schemas\":[{\"schemaid\":\"rns1lbFcU6-0GcMNTmAl\",\"schema\":\"BING\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"wR31L2h3jvr39F1P76Xs\",\"schema\":\"SSS\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"4H5cl46H-lzFXX5ZQE23\",\"schema\":\"TEST\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"UEHXb6qLSnOPqj8x04Vw\",\"schema\":\"XX\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"oXwAkQxGCrEjpTDL1bLK\",\"schema\":\"XXX\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"Jjkw0JLekO5ciYEPoGVM\",\"schema\":\"bai\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"IFezvwOs0sUpedyGN6fQ\",\"schema\":\"cqq\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"-Psuv5eP-OsfelU55ZLT\",\"schema\":\"czy\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"77VWhyLKkvrj1-m5HvrL\",\"schema\":\"dm_source\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"mrhLQzTGswX6Qm-RZg3w\",\"schema\":\"dmlilu\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"ilWCLfGZ2nKkT00QcVF0\",\"schema\":\"dmrealinfo\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"pRVdZ-qwXo1N-sSV-MEm\",\"schema\":\"dog\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"SpnY9cSGBCS50PIOsa15\",\"schema\":\"gaussdbxx\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"YwaHTj2TcXb1ryZiN3DO\",\"schema\":\"lilu_dm\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"9VGXBSKw4GbVc5aFODgW\",\"schema\":\"lilu_dm2\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"lcpwqwgjaISmt4zGLNvU\",\"schema\":\"lilu_xz\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"o16mPg0jSwB47Ah-7CsE\",\"schema\":\"llc\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"Counbl1GQgXBiKo8K2bv\",\"schema\":\"odsdb\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"wv3vjRrXUWOEXN87lNrD\",\"schema\":\"slj_kaifa\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"jvGpkxE8tnikTId5mE1o\",\"schema\":\"test23\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"n2v-emJtNOGdKMLoNTLU\",\"schema\":\"udf22\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"Q3FRHKJXz005x2GPfW7r\",\"schema\":\"xlldm\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"zAf8C2o-tNMlzPROzKSp\",\"schema\":\"xlltest\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"kldZopkdlj6Mtv5iSzLP\",\"schema\":\"xlltest2\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"WzQqtI-d-2ZeqgCQiZtY\",\"schema\":\"yccdm\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"GXDS5TG-eVgWtopn0FGW\",\"schema\":\"yyqdm\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"brKaeAxtBgMrqjkSpDfB\",\"schema\":\"yyqtest\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"iSls2kn8fiRCfOaNue-9\",\"schema\":\"zydameng\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"EnGXVgmOnuCQnm2c09tI\",\"schema\":\"TEST2\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"eyea3vEdpZOYC8XTkqJs\",\"schema\":\"XXX2\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"YDH2kolDjttp1eyJQOVs\",\"schema\":\"WG\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"lwIreFWT0UPDNzqtsYAp\",\"schema\":\"WH\",\"TableInfoMap\":null,\"cancreate\":false},{\"schemaid\":\"8FLOdJjDWUn6Lv88QJAO\",\"schema\":\"ZYX\",\"TableInfoMap\":null,\"cancreate\":false}],\"schemasstr\":\"\",\"tablesinfo\":null,\"tbstr\":\"\",\"tbnum\":379,\"dbstatus\":true,\"realtime\":false,\"checklog\":null,\"synclog\":null,\"createtime\":\"2021-05-13 10:30:49\",\"updatetime\":\"2021-05-13 10:30:49\",\"used\":true,\"sync\":{\"execnum\":-1,\"scheduletype\":1,\"scheduledetail\":\"10:30\",\"nowsync\":true,\"lastsynctime\":\"\"},\"synctimes\":32,\"describe\":\"\",\"projectid\":\"shxc\",\"folderid\":\"AXiHBO4I6dwnrwxLQJan\",\"realtable\":null,\"cancreate\":false,\"synctbinfo\":null},{\"id\":\"AXiHBsA06dwnrwxLQJgE\",\"dbname\":\"hjk_test\",\"dbtype\":\"oracle\",\"normalconn\":{\"dbip\":\"192.168.90.205\",\"dbport\":\"1521\",\"dbuser\":\"zhou2\",\"dbtype\":\"oracle\",\"dbpassword\":\"zhou2\",\"oraclesid\":\"\",\"oracleserver\":\"orcl\"},\"csvconn\":{\"ip\":\"\",\"port\":\"\",\"loginuser\":\"\",\"loginpassword\":\"\",\"encoding\":\"\",\"delimiter\":\"\",\"csvpaths\":\"\",\"localpath\":\"\"},\"hiveconn\":{\"hiveurl\":\"\",\"coresitexmlpath\":\"\",\"hivesitexmlpath\":\"\",\"hdfssitexmlpath\":\"\",\"authmethod\":0,\"keytabfilepath\":\"\",\"krb5confpath\":\"\",\"principal\":\"\",\"driverinfo\":{\"id\":\"\",\"driverpluginname\":\"\",\"name\":\"\",\"driverpath\":\"\"},\"hiveuser\":\"\",\"hivepassword\":\"\",\"domains\":null},\"haveschema\":true,\"schemas\":[{\"schemaid\":\"Lr8qEhx4VZ9o-AuIyQU5\",\"schema\":\"TEST1\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"ihlfPVgkjUm2b0AChEzn\",\"schema\":\"TESTING\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"anCQqrivIA2a68WxP21C\",\"schema\":\"HST\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"rfhQegdAS9V9S7oXmSOF\",\"schema\":\"USER123\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"-k09ekG7LwzB1yw0gpao\",\"schema\":\"ZJGK\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"pjDAV251ugbVrk2DHvzq\",\"schema\":\"HKLAST\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"tTaHVMwr9Ui0Q-02UAcm\",\"schema\":\"WANGBING\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"B9BfHnjIZLY-0VQXnYPQ\",\"schema\":\"WG\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"M1qLIkvqBKBojxFLTNpl\",\"schema\":\"DATATOM\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"qfPkTBdWqKucFPk8uGbx\",\"schema\":\"WB\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"KnndQvVnEfnz7cH2iT2j\",\"schema\":\"DETUO_ONLINE\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"P2VDsx3qDv1CbpZBOtqT\",\"schema\":\"HK\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"nzm4NbnbmyRkP0oi5e-2\",\"schema\":\"ZHOUBING\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"IKNFM0eYdnQWdELDHHsH\",\"schema\":\"QJ_ZSJ\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"ia6g6AQzQ3ip11Vs3hfI\",\"schema\":\"QJ_DMB\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"p2BEeO92gtTWV8WRzKYl\",\"schema\":\"BAI\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"KQY6I4cL9Oe-S1wef-D6\",\"schema\":\"CCX\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"Rtns5ATuRE7SAOv3g6Nb\",\"schema\":\"TTEST\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"wd7snDxfF20CNiihilli\",\"schema\":\"ZHOU2\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"T87aiFHKhjEduLUBLr9t\",\"schema\":\"LILONGCHAO\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"qcbvUsE-9iT1jadjxGp3\",\"schema\":\"ZHOU1\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"2IJf9xBYGJjACD3f0dQw\",\"schema\":\"LRZ\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"2KKORcAJahU8BsFQtbuH\",\"schema\":\"LIANG\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"4ODWJtgAUmt3TNbWOoIN\",\"schema\":\"BI\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"-DJ5Lvf-74l1gHo7I8yj\",\"schema\":\"FDW\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"uhRriO6XJrgoNQcxcBpa\",\"schema\":\"DB2INST1\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"02F8nRW52v8MrGrLEm7u\",\"schema\":\"OGGONE\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"uuyQvMiBqJuLiMkrN3p5\",\"schema\":\"ZHOU\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"y1pQulpxFVPO6sT1Ibzq\",\"schema\":\"XZQ\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"y08fB3p3y2aOH6dYbF7Y\",\"schema\":\"ZHS\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"MHHOQ9iE-rhzu423SwxT\",\"schema\":\"ZH\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"iUzyzh2Hd0ERf6lsilAO\",\"schema\":\"ZHOUJUNJUN\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"HvBNXetbuuWS9uBaX6PE\",\"schema\":\"SS1\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"zurFsghRSWgKQsJDr2-G\",\"schema\":\"CHENG\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"CtoHS5nctpKj0YGsXHPT\",\"schema\":\"CHEN\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"0g7H061uzfrpx78T9fmc\",\"schema\":\"ZHANGS\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"WCON06j6XxeJULQWbdUA\",\"schema\":\"ZHANG\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"CBJ9-LbjX4v3r34APhLu\",\"schema\":\"OGG\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"1taNM4imPiYqTkF5oYu5\",\"schema\":\"DLL\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"TWS2k7T9S1qjW67BAKED\",\"schema\":\"ZHAOXU\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"hZSjD98EO9ns2qkH1UO1\",\"schema\":\"DATATEST\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"1W40S5Y3Cu2GC505SXYF\",\"schema\":\"MONITOR\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"z5wYHIi1YqkF7U9xdMi0\",\"schema\":\"SCOTT\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"-l10sYJkA6pWDkwTTMhB\",\"schema\":\"OWBSYS_AUDIT\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"ja-omFkX92JcDStlHhHT\",\"schema\":\"PRIMARYKEY\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"0B7vC-bTsXAMb96HEz3k\",\"schema\":\"APEX_030200\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"ulLVBlfpU94n1jYzDhGr\",\"schema\":\"FLOWS_FILES\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"iZBnVbaB-nUdW5rg7Egh\",\"schema\":\"SYSMAN\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"3ICk74qW6stLEpJVADCA\",\"schema\":\"SI_INFORMTN_SCHEMA\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"ZkfX18IbGI8ymSHt3gMQ\",\"schema\":\"ORDPLUGINS\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"9y6BN1Lw9gSOLM-7NTdB\",\"schema\":\"ORDDATA\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"xU4vMP11oor52G43cK0Y\",\"schema\":\"XDB\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"zXOdVLcCilKxi-ciFO3Y\",\"schema\":\"DBSNMP\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"u1rVDL7GDRbjFFfk7nff\",\"schema\":\"ORACLE_OCM\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"HiZHbedRjTv4BAtUIDOu\",\"schema\":\"OUTLN\",\"TableInfoMap\":null,\"cancreate\":true},{\"schemaid\":\"iJdNuGJHSV2J2Vhu887j\",\"schema\":\"SYSTEM\",\"TableInfoMap\":null,\"cancreate\":true}],\"schemasstr\":\"\",\"tablesinfo\":null,\"tbstr\":\"\",\"tbnum\":12624,\"dbstatus\":true,\"realtime\":false,\"checklog\":null,\"synclog\":null,\"createtime\":\"2021-05-12 14:50:24\",\"updatetime\":\"2021-05-12 14:50:24\",\"used\":true,\"sync\":{\"execnum\":-1,\"scheduletype\":1,\"scheduledetail\":\"14:41\",\"nowsync\":true,\"lastsynctime\":\"\"},\"synctimes\":37,\"describe\":\"汇集库改造测试使用\",\"projectid\":\"shxc\",\"folderid\":\"AXiHBO4I6dwnrwxLQJan\",\"realtable\":null,\"cancreate\":true,\"synctbinfo\":null}],\"total\":2,\"unuse\":0,\"use\":2}\n";

     /*  String str ="https://daokangprivate.oss-cn-beijing.aliyuncs.com/cooperativesupplier-prisit/supplier/inquiryInfo/1def6fc1cd9d4656995f3b45eee452bd/20210408/9381dbc013e64d19a7f783aa0abb25b3.jpg?Expires=1617867442&OSSAccessKeyId=LTAICCXGWN6P7oQQ&Signature=YIhVhl2cyz/vP7aBhMKc0S%2BO5AM%3D";
        byte[] fileByte = HttpUtil.downloadBytes(str);
        FileUtil.writeBytes(fileByte,"D://x.jpg");
        System.out.println(fileByte.length);*/
        //SpringApplication.run(IdentiyServiceDemoApplication.class, args);

      /*  HashMap<String, Object> map = new HashMap<>();
        map.put("userName","dabao");
        map.put("password","111111");
        String str = HttpUtil.post("http://localhost:8080/api/common/taobaoAuth", map);
        System.out.println(str);
        JSONObject object = JSONObject.parseObject(str);
        JSONObject resData = object.getJSONObject("data").getJSONObject("res_data");
        System.out.println(resData);*/


        //SpringApplication.run(IdentiyServiceDemoApplication.class, args);

        //CsvReader reader = CsvUtil.getReader();
        //SpringApplication.run(IdentiyServiceDemoApplication.class, args);
        // 新建客户端
        /*SoapClient client = SoapClient.create("http://www.webxml.com.cn/WebServices/WeatherWebService.asmx")
                // 设置要请求的方法，此接口方法前缀为web，传入对应的命名空间
                .setMethod("web:getSupportProvince", "http://WebXml.com.cn/");
                // 设置参数，此处自动添加方法的前缀：web
                //.setParam("theIpAddress", "218.21.240.106");

        // 发送请求，参数true表示返回一个格式化后的XML内容
        // 返回内容为XML字符串，可以配合XmlUtil解析这个响应
        String str = client.send(true);
        System.out.println(str);
        Document document = XmlUtil.parseXml(str);

       *//* Node node  = document.getDocumentElement().getElementsByTagName("soap:Body").item(0);
        //NodeList nodeList = element.getElementsByTagName("soap:Body");
        Node node1 = node.getOwnerDocument().getElementsByTagName("getSupportProvinceResponse").item(0);
        NodeList nodeList = node1.getOwnerDocument().getElementsByTagName("getSupportProvinceResult");

        System.out.println(nodeList.item(0).getNodeName());*//*

        NodeList nodeList2 = document.getDocumentElement().getElementsByTagName("soap:Body").item(0)
                .getOwnerDocument().getElementsByTagName("getSupportProvinceResponse").item(0)
                .getOwnerDocument().getElementsByTagName("getSupportProvinceResult").item(0)
                .getOwnerDocument().getElementsByTagName("string");
        System.out.println(nodeList2.item(0).getTextContent());
        for(int i=0;i<nodeList2.getLength();i++){
            System.out.println(nodeList2.item(i).getTextContent());
        }*/
        //NodeList childNodes = nodeList.item(0).get

        //System.out.println(childNodes.item(0).getNodeName());
        //System.out.println(element.getChildNodes().);

//String str = HttpUtil.get("http://127.0.0.1:8080/api/common/downTradeLogFile");
/*HttpUtil.downloadFile("http://127.0.0.1:8080/api/common/downTradeLogFile","D://2020-09-01.txt");

        List<String> list = FileUtil.readLines("D://2020-09-01.txt","utf-8");
        list.remove(0);
        list.forEach(c->{
            String[] str = StringUtils.split(c,"|");
            System.out.println();
        });*/
        /*byte[] key = SecureUtil.generateKey(SymmetricAlgorithm.AES.getValue()).getEncoded();
        AES aes = SecureUtil.aes(key);
        System.out.println(aes.decryptStr(key));*/
        //System.out.println(new String(aes.encrypt("159021484451")));

        /*DateTime dateTime = DateUtil.endOfDay(new Date());
        DateTime dateTime1 = DateUtil.beginOfDay(new Date());
        System.out.println(DateUtil.format(dateTime,"yyyy-MM-dd HH:mm:ss"));
        System.out.println(DateUtil.format(dateTime1,"yyyy-MM-dd HH:mm:ss"));*/
        //HttpUtil.downloadFile("http://127.0.0.1:8080/api/common/downTradeLogFile","D://2020-09-01.zip");
        //File file = ZipUtil.unzip("D://2020-09-01.zip","D://");


        //String str = HttpUtil.post("https://mxnzp.com/api/address/list?app_id=pnjgrriit6wghnlo&app_secret=YXBoenBlWnZmanhLWTRxenNCL1p3Zz09",Maps.newHashMap());
        //System.out.println(str);
        // ResultJson json = JSON.parseObject(str, ResultJson.class);
        //System.out.println(JSON.toJSONString(json.getData()));

        //DateUtil.beginOfDay()

      /*  Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR,0);
        calendar.set(Calendar.MINUTE,0);
        calendar.set(Calendar.SECOND,0);
        System.out.println(DateFormatUtils.format(calendar.getTime(),"yyyy-MM-dd HH:mm:ss"));
*/

        //System.out.println(DateUtil.endOfDay(new Date()));

      /*  for(int i=0;i<100000;i++){
            HttpUtil.post("http://127.0.0.1:8080/api/common/sendSms?mobile=15921484451&sign=24412412",Maps.newHashMap());
        }

        String str = "我 是  ";
        str = str.replace(" ","");
        System.out.println(str);*/
        //String str ="K";
        //System.out.println(str);

        // System.out.println(URLEncoder.encode("大宝","UTF-8"));

        //String str = HttpUtil.get("http://www.baidu.com");
        //System.out.println(str);


        //为什么使用消息队列
        //异步（发送短信验证码），削峰（秒杀，流量比较大的时候），解耦

        //用消息队列会存在什么样的问题
        //
        //String s1="bc";
        //String s2 = new String("bc");
        //System.out.println(s1==s2);
        // JSONObject


        //获取锁（redis保存一个唯一的key和value，同时要设置时间）
        //（1.先设置key和value，再设置过期时间，3S）

        //执行任务（6S）

        //释放锁（根据key删除数据）

       /* HashSet<String> set = new HashSet();
        set.add("a");
        set.add("a");
        set.add("b");
        System.out.println(JSON.toJSONString(set));*/


       /* HashSet<DemoVo> set = new HashSet();
        DemoVo demoVo =new DemoVo();
        demoVo.setId(1);
        DemoVo demoVo1 =new DemoVo();
        demoVo1.setId(1);
        set.add(demoVo);
        set.add(demoVo1);

        System.out.println(JSON.toJSONString(set));*/

      /* String str1="hello";
       String str2="he"+new String("llo");
       System.out.println(str1==str2);*/
     /* Integer x=1000;
      int y=1000;
        System.out.println(x==y);
      x=100;
        System.out.println(x==100);*/
    /* int x=2;
     int y =(x++)*3;
        System.out.println(x);*/

    }


}


